str1 = '2'
print(float(str1))
# tuple 序列转换一个元祖
t = [10,20,30]
print(tuple(t))
# list 序列转换一个列表
t = (10,20,30)
print(list(t))
# eval 将字符串转成成原来的数据类型
str1 = '1'
str2 = '1.1'
str3 = '[10,20,30]'
str4 = '(10,20,30)'
print(type(eval(str1)))
print(type(eval(str2)))
print(type(eval(str3)))
print(type(eval(str4)))